﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="MyContextualGroup.WebPartContextualTab"
                Location="CommandUI.Ribbon"
                Title="MyContextualGroup.WebPartContextualTab">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ContextualTabs._children">
          <ContextualGroup Id="Ribbon.MyContextualGroup"
                           Title="MyContextualGroup"
                           Sequence="100"
                           ContextualGroupId="MyContextualGroup"
                           Command="Ribbon.MyContextualGroup"
                           Color="Green">
            <Tab Id="Ribbon.MyContextualGroup.WebPartContextualTab"
                 Title="My Tab With Content"
                 Sequence="300"
                 Command="Ribbon.MyContextualGroup.WebPartContextualTab">
              <Scaling Id="Ribbon.MyContextualGroup.WebPartContextualTab.Scaling">
                <MaxSize Id="Ribbon.MyContextualGroup.WebPartContextualTab.Scaling.DemoGroup.MaxSize" Sequence="10" GroupId="Ribbon.MyContextualGroup.WebPartContextualTab.DemoGroup" Size="Large" />
              </Scaling>
              <Groups Id="Ribbon.MyContextualGroup.WebPartContextualTab.Groups">
                <Group Id="Ribbon.MyContextualGroup.WebPartContextualTab.DemoGroup"
                       Title="Demo Group Static Layout"
                       Sequence="10"
                       Command="Ribbon.MyContextualGroup.WebPartContextualTab.DemoGroup"
                       Template="Ribbon.Templates.OneLargeControl">
                  <Controls Id="Ribbon.MyContextualGroup.WebPartContextualTab.DemoGroup.Controls">
                    <Button Id="Ribbon.MyContextualGroup.WebPartContextualTab.DemoGroup.MyFirstButton"
                            LabelText="Click Me"
                            Description="Demo Button"
                            Sequence="10"
                            TemplateAlias="c1"
                            Command="Ribbon.MyContextualGroup.WebPartContextualTab.DemoGroup.MyFirstButton"
                            Image16by16="/_layouts/images/RibbonCustomization/Warning16.png"
                            Image32by32="/_layouts/images/RibbonCustomization/Warning32.png" />
                  </Controls>
                </Group>
              </Groups>
            </Tab>
          </ContextualGroup>
        </CommandUIDefinition>
      </CommandUIDefinitions>
    </CommandUIExtension>
  </CustomAction>
</Elements>
